--单行注释

-- local x = 1
-- local a = 1
-- local b = 1

local c = 2
print(c)

local d = "abcdefg"
print(d)

e=true;
print(type(e))


str1="nishi"
str2="zhu"
print("字符串拼接"..str1..str2)



local obj1 = {}
obj1.name="mou";
obj1.age=12 
print(obj1.name)


local tbl2 = {"apple", "pear", "orange", "grape"}
for i,v in ipairs(tbl2) do
	print(i,v)
end



-- local  obj2 = {
-- 	name="san"
-- 	age=12
-- 	function show( ... )
-- 		print(name)
-- 	end
-- } 
-- obj2.show();

function method( num )
	if num==0 then
		return 0
	else
		return num+1
	end	
end

print(method(0));
print(method(2));


function testFun(num ,action)
	action(num);
end

testFun(10,function(num)
	print(num*10);
end)